<%@ page language="java" import="java.util.*,code.bean.*" pageEncoding="UTF-8"%>
<%@ page import="code.util.ParamUtils" %>
<%@ page import="code.util.DateUtils"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme() + "://"+ request.getServerName() + ":" + request.getServerPort()+ path + "/";
%>

<%
	User loginUser = (User)ParamUtils.getObjectAttribute(session, "loginUser", null);
	User user = (User)ParamUtils.getObjectAttribute(request, "user", null);
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
   <base href="<%=basePath%>">
   <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
   <title>用户信息</title>

   <link href="css/s.css" rel="stylesheet" type="text/css" />
   <link href="css/comment_7.css" rel="stylesheet" type="text/css" />

</head>

<body>
<div id="head">
	<div class="hd">
		<div class="l tac wl2" style="width:720px;padding:3px;">
		<table width="100%"><tr>
			<td><div style="padding-left:15px;"><a href="servlet/ShowIndex1"><img src="images/pcslogo.gif"/></a></div></td>
			<td class="ce" style="font-size:14px">
			&nbsp;<a href="servlet/ShowSpace?userid=<%=ParamUtils.getParameter(request, "userid", "")%>" class="ce">主页</a>&nbsp;┊
			&nbsp;<a href="servlet/ShowCode?userid=<%=ParamUtils.getParameter(request, "userid", "")%>&blogdate=<%=DateUtils.format(Calendar.getInstance().getTime())%>" class="ce">我的代码</a>&nbsp;┊
			&nbsp;<a href="servlet/ShowShare?userid=<%=ParamUtils.getParameter(request, "userid", "")%>" class="ce">我的收藏</a>&nbsp;┊
			&nbsp;<a href="servlet/ShowProfile?userid=<%=ParamUtils.getParameter(request, "userid", "")%>" class="ce">用户信息</a>&nbsp;┊
			&nbsp;<a href="servlet/ManageCode?userid=<%=ParamUtils.getParameter(request, "userid", "")%>&cmd=add" class="ce">发布代码</a>&nbsp;┊
			&nbsp;<a href="../CodeSharer/advSearch.jsp?userid=<%=ParamUtils.getParameter(request, "userid", "")%>" class="ce">搜索</a>
			
			<%
				if(session.getAttribute("loginUser") != null && ((User)(session.getAttribute("loginUser"))).getId().equals(ParamUtils.getParameter(request, "userid", "")))
			    { 
					out.println("&nbsp;┊&nbsp;<a href=\"servlet/CodeList?userid=" + ParamUtils.getParameter(request, "userid", "") + "\" class=\"ce"+"\">代码管理</a>");
				    out.println("&nbsp;┊&nbsp;<a href=\"servlet/ShareList?userid=" + ParamUtils.getParameter(request, "userid", "") + "\" class=\"ce"+"\">收藏管理</a>");
				    out.println("&nbsp;┊&nbsp;<a href=\"servlet/DoLogout" + "\" class=\"ce"+"\">退出</a>");
				}
			%>
			</td>
		</tr></table>
		</div>
		<div align="right">
			<table>
			<tr>
			<td>
			    <div style="padding:4px;"></div>
				<form name="" action="servlet/SearchCodeByTitle?userid=<%=ParamUtils.getParameter(request, "userid", "")%>" method="post">
				<input type="text" name = "title1" value="" maxlength="15"/>
				<input type="submit" class="signinbtn1" value="搜标题"/>
				</form>
			</td>
			<td>
			&nbsp;&nbsp;&nbsp;&nbsp;
			<%if(session.getAttribute("loginUser") != null){ %>
			<a href="servlet/ShowSpace?userid=<%=
			((User)
			(session.getAttribute
			("loginUser"))).getId()
			%>" class="ce" style="font-size:16px">
			<%=((User)
			(session.getAttribute
			("loginUser"))).getNickName()%>
			</a>
			<%}%>
			</td>
			</tr>
			</table>
		</div>
		<div class="c"></div>
	</div>
</div>

<div id="main">
	<div class="m1 wl2" style="width:230px;">
    	<div class="m1t"></div>
       <div style="padding:15px 0 0 15px;">
		
		    <div class="f13 ml20"><span style="font:bold 20px '黑体'; color:#D01E3B;">CodeSharer<br /></span> </div>
		    <div style="background:url(images/index_app.gif) repeat-x;width:190px;margin:20px auto 15px 7px;height:2px;"></div>

            <div id="text1div" class="f13 ml20"><img src="images/arrow_l.gif" align="absmiddle" />这里是帮助你管理你的代码，并与你的朋友、同事、同学一起分享代码的真实平台</div>
	     
			<div style="background:url(images/index_app.gif) repeat-x;width:190px;margin:20px auto 15px 7px;height:2px;"></div>
						
			<div id="text1div" class="f13 ml20"><img src="images/arrow_l.gif" align="absmiddle" />支持代码高亮显示</div>
			<div style="padding:2px;"></div>
			<div id="text1div" class="f13 ml20"><img src="images/arrow_l.gif" align="absmiddle" />支持代码版本控制</div>
			<div style="padding:2px;"></div>
			<div id="text1div" class="f13 ml20"><img src="images/arrow_l.gif" align="absmiddle" />支持代码分享、收藏、评论</div>
			<div style="padding:2px;"></div>
	  </div>
    </div>
	
	<div class="m2 wr2" style="width:770px;">
	<div id="r2s_2">
		<div id="r2l" style="width:700px;">
			<div style="padding:20px;"></div>
			<div class="r1t">
			    <div class="l">
			     <div class="l50_s" ><img src="<%=user.getIcon()%>" width="100" height="100" /></div>
			    </div>
			    <div class="l">
				  <div class="xcj41"><b>我的详细资料</b></div>
				  <div class="cd"><a href="servlet/ShowSpace?userid=<%=ParamUtils.getParameter(request, "userid", "")%>" class="sl">我的首页</a></div><br/>
				  <%if(loginUser != null && loginUser.getId().equals(user.getId())){%>
				  <div class="cd"><a href="servlet/ShowEdit?userid=<%=user.getId()%>" class="sl">更新我的信息</a></div>
				  <%}%>
			    </div>
			    <div class="c"></div>
		    </div>
		
		<div class="p10 p_sz_r1">
			<p class="qm122"><b>用户信息</b></p>
            
			<div style="padding:5px;"></div>
			<div style="display:block;"><p class="l w80 tar c6">昵&nbsp;称：</p><p class="gw14">&nbsp;</p><p class="l"><%=user.getNickName()%></p><p class="c"></p>
			</div>
			<div style="padding:5px;"></div>
			
			<div style="display:block;"><p class="l w80 tar c6">城&nbsp;市：</p><p class="gw14">&nbsp;</p><p class="l"><%=user.getCity()%></p><p class="c"></p>
			</div>
			
			<div style="padding:5px;"></div>
			
			<div style="display:block;"><p class="l w80 tar c6">Email：</p><p class="gw14">&nbsp;</p><p class="l"><%=user.getEmail()%></p><p class="c"></p>
			</div>
			
			<div style="padding:5px;"></div>
			
			<div style="display:block;"><p class="l w80 tar c6">点&nbsp;击：</p><p class="gw14">&nbsp;</p><p class="l"><%=user.getSpaceHit()%></p><p class="c"></p>
			</div>
			
			<div style="padding:20px;"></div>
			
		</div>
		</div>
		</div>
	</div></div>


<div id="b">
	<div class="b1"><a href="#" class="c6" target="_blank">关于我们</a><span>┊</span><a href="/s/contact.html" class="c6" target="_blank">联系方式</a><span>┊</span><a href="/t/feedback.html" class="c6" target="_blank">意见反馈</a><span>┊</span><a href="/s/help.html" class="c6" target="_blank">帮助中心</a>　 &nbsp;<a class=c6 href=http://www.miibeian.gov.cn target=_blank>NENU</a> <img src="images/gs.gif" width="15" align="absmiddle" />&nbsp;<img src="images/jc.gif" width="17" align="absmiddle" /></div>

</div>

</body>
</html>
